package com.haiqi.modules.main.service;

import com.haiqi.common.persistence.dao.CommunicationInfoMapper;
import com.haiqi.common.persistence.entity.CommunicationInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by hythzx on 2016/5/20.
 */
@Service
public class GetInfoService {

    @Autowired
    private CommunicationInfoMapper communicationInfoMapper;

//    @Cacheable(value = "getCommunicationInfoById",keyGenerator = "cexKeyGenerator")
    public CommunicationInfo getCommunicationInfoById(int id){
        System.out.println("通过数据库获取数据...");
        CommunicationInfo communicationInfo =  communicationInfoMapper.selectByPrimaryKey(id);
        return communicationInfo;
    }
}
